

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_app_05/action/states/dark_states.dart';
import 'package:flutter_app_05/utils/MyTheme.dart';
import 'package:provider/provider.dart';

class Padecaltwo extends StatefulWidget {
  @override
  _PadecaltwoInState createState() => _PadecaltwoInState();
}

class _PadecaltwoInState extends State<Padecaltwo> {
  TextEditingController mianjiController = TextEditingController();
  bool invalidMianji = false;

  @override
  Widget build(BuildContext context) {
    return Consumer<DartState>(builder: (context, categoryState, child) {
      return columns(categoryState);
    });
  }

  Widget columns(DartState categoryState) {
    Widget h=Container(height: 1,color:  MyTheme(context).getColor("line_color"),alignment: Alignment.center,margin: EdgeInsets.only(top: 10.0,bottom: 10.0),);
    return Container(
      decoration: new BoxDecoration(color: Color(0xfafafa)),
      child: Column(
        children: [
          Container(
            margin: EdgeInsets.all(10.0),
            padding: EdgeInsets.all(15),
            decoration: new BoxDecoration(
                // border: new Border.all(color: Color(0xFFFF0000), width: 0.5),
                color: Colors.white,
                borderRadius: new BorderRadius.circular((10.0))),
            alignment: Alignment.center,
            height: 200,
            child: Column(
              children: [
                Row(
                  mainAxisAlignment: MainAxisAlignment.spaceAround,
                  children: [
                    Text("*",style: TextStyle(color: Colors.red),),
                    Expanded(child:  Text("供暖面积")),
                     Container(
                width: 50.0,
               child: TextField(
                  maxLength: 100,
                 decoration: null,
                ),
              ),
                    Text("m²",),
                  ],
                ),
                h,
                Row(
                  mainAxisAlignment: MainAxisAlignment.spaceAround,
                  children: [
                    Text("  ",style: TextStyle(color: Colors.red),),
                    Expanded(child:  Text("预供流量")),
                    Container(
                      width: 50.0,
                      child: TextField(
                        maxLength: 100,
                        decoration: null,
                      ),
                    ),
                    Text("L/m²",),
                  ],
                ),
                h,
                Row(
                  mainAxisAlignment: MainAxisAlignment.spaceAround,
                  children: [
                    Text("  ",style: TextStyle(color: Colors.red),),
                    Expanded(child:  Text("站内阻力")),
                    Container(
                      width: 50.0,
                      child: TextField(
                        maxLength: 100,
                        decoration: null,
                      ),
                    ),
                    Text("m",),
                  ],
                ),
                h,
                Row(
                  mainAxisAlignment: MainAxisAlignment.spaceAround,
                  children: [
                    Text("*",style: TextStyle(color: Colors.red),),
                    Expanded(child:  Text("阻力")),
                    Container(
                      width: 50.0,
                      child: TextField(
                        maxLength: 100,
                        decoration: null,
                      ),
                    ),
                    Text("m",),
                  ],
                ),
                h,
              ],
            ),
          ),
          Expanded(
              child: Stack(
            children: [
              Positioned(
                child: Container(
                  height: 80.0,
                  decoration: BoxDecoration(
                    borderRadius: BorderRadius.circular(12),
                  ),
                  alignment: Alignment.bottomCenter,
                  child: Row(
                    children: [
                      Expanded(
                        child: GestureDetector(
                          child: Container(
                            decoration: BoxDecoration(
                              color: Colors.white70,
                              borderRadius: BorderRadius.only(
                                  topLeft: new Radius.circular(12.0),
                                  bottomLeft: new Radius.circular(12.0)),
                            ),
                            child: Center(
                              child: Text(
                                "重置",
                                style: new TextStyle(fontSize: 25.0),
                              ),
                            ),
                          ),
                          onTap: () {},
                        ),
                      ),
                      Expanded(
                        child: GestureDetector(
                            child:   Container(
                            decoration: BoxDecoration(
                              color: Colors.green,
                              borderRadius: BorderRadius.only(
                                  topRight: new Radius.circular(12.0),
                                  bottomRight: new Radius.circular(12.0)),
                            ),
                              child: Center(
                                child: Text(
                                  "提交",
                                  style: new TextStyle(fontSize: 25.0),
                                ),
                              ),
                          ),
                          onTap: (){
                          },
                        ),
                      )
                    ],
                  ),
                ),
                bottom: 15.0,
                left: 10.0,
                right: 10.0,
              ),
            ],
          )),
        ],
      ),
    );
  }
}
